package com.lagou.service.impl;

import com.lagou.service.api.EmailService;
import com.lagou.service.biz.EmailBizService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service(retries = 0, timeout = 10000)
public class EmailServiceImpl implements EmailService {

    @Autowired
    private EmailBizService emailBizService;

    /**
     * 发送验证码到邮箱
     *
     * @param email
     * @param code
     * @return
     */
    @Override
    public boolean sendEmail(String email, String code) {
        emailBizService.sendSimpleTextMail(email, "验证码测试", "您的登录验证码为: " + code);
        return true;
    }
}
